avalanche-proto 0.15.6

Protobuf generated client and server resources for Avalanche gRPC in rust
docs.rs failed to build avalanche-proto-0.15.6
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build: avalanche-proto-0.19.0

Crates.io

https://crates.io/crates/avalanche-proto

avalanche-proto

Protobuf generated client and server resources for Avalanche gRPC in rust. The generated stubs use the upstream avalanchego/proto definitions as the source of truth and versioning will align with avalanchego releases.

Versions

Support for avalanchego protocol version 15+.

The release version will align with the protocol version for avalanchego. In our example linked above avalanchego is currently on protocol version 15. This aligns with the minor version of the avalanche-proto release. Patches to minor releases could include improvements or bug fixes.

avalanche-proto = { version = "0.15", features = [] } // supports avalanchego protocol version 15

Usage

use avalanche_proto::{
    http::{
        http_server::Http,
        HttpRequest, HandleSimpleHttpResponse, HandleSimpleHttpRequest
    },
    google::protobuf::Empty,
};
use avalanche_proto::grpcutil;

grpcutil::default_server()
    .add_service(VmServer::new(vm))
    .serve_with_incoming(TcpListenerStream::new(listener))
    .await
    .map_err(|e| {
        Error::new(
            ErrorKind::Other,
            format!("failed to serve vm service: {}", e),
        )
    })